# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: Victor Häggqvist <aur@snilius.com>

_name=pyfiglet
pkgname=python-pyfiglet
pkgver=0.8.post1
pkgrel=7
pkgdesc='Pure-python FIGlet implementation'
url=https://github.com/pwaller/pyfiglet
license=('GPL')
arch=('any')
depends=('python-setuptools')
makedepends=('python-build' 'python-installer' 'python-wheel')
checkdepends=('figlet')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('c6c2321755d09267b438ec7b936825a4910fec696292139e664ca8670e103639')
b2sums=('49268581974e72f28ddb11785a1629a4ac2696bcdd57710147cafdcf7709be8c67bdf03e5ccdb1655a9be6eb8a83baf4ca5ae0a6412e2318d0923376558b8d49')

build() {
  cd $_name-$pkgver
  python -m build --wheel --skip-dependency-check --no-isolation
}

check() {
  cd $_name-$pkgver
  PYTHONPATH=. python pyfiglet/test.py
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
